Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cassandra_bench_mocked.rs
We want a bench that can better show small changes to performance without it getting lost in noise.
I achieved this by replacing cassandra with a custom cassandra implementation where everything is mocked out and it only supports the absolute bare minimum to perform the benchmark.
An important insight I had while working on this was that we want to assign the cores of the machine such that shotover is the bottleneck. By doing so any improvements/regression to shotover will be much more visible.
To do this I experimented with different core counts and found that giving the client and DB 3 cores and shotover 1 core made shotover sufficiently bottlenecking while allowing it to run on just an 8 core machine.
If we dont have 8 cores available then we fall back to 1 core each which is not ideal but is still better than overassigning cores on a machine that doesnt have the cores.
context of this work
I originally wrote this a while back to confirm that #985 improves performance as expected. It ended up demonstrating degraded performance so I've put 985 on hold for now, but I would still like to get this checked in for future use.
I additionally think this approach could give us more consistent results in our criterion benchmarks as I suspect the majority of the instability of results is from cassandra itself.
But for now lets just evaluate it as an
--example
benchmark that compares sending messages with and without shotover in between.